{% extends "base_generic.html" %}

{% block content %}
    <h1>Name: {{ author.first_name }} {{ author.last_name }}</h1>

    <p><strong>Date of Birth:</strong> {{ author.date_of_birth }}</p>
    <p><strong>Date of Death:</strong> {{ author.date_of_death }}</p>

    <div style="margin-left:20px;margin-top:20px">


        <h4>Books</h4>
        {% for book in author.book_set.all %}
            <hr>
            <h5><a href="{% url 'book-detail' book.pk %}">{{ book.title }}</a></h5>
            <p><strong>Summary:</strong>{{ book.summary }}</p>
        {% endfor %}

    </div>
{% endblock %}